<?php
class BootstrapFactory implements Factory{

	const _SUFFIX = "Bootstrap";

	/**
	 * (non-PHPdoc)
	 * @see library/Factory/Factory::getInstance()
	 * @param string $module
	 * @return Controller
	 */
	public function getInstance($module){}
	/**
	 * Enter description here ...
	 * @param string $context
	 * @return ModuleBootstrap
	 */
	public static function instance($context){
		$class = $context.BootstrapFactory::_SUFFIX;
		if(class_exists($class)){
			return new $class;
		}
		else {
			Log::error("BootstrapFactory", "Class " . $class . " Not found");
			if(Configuration::DEBUG_MOD)
				throw new BoostrapException("Class " . $class . " Not found");
			return null;
		}
	}

}